widget: Give some meaning to "visible"
authorBenjamin Otte <otte@redhat.com>
Tue, 8 Jan 2013 13:56:02 +0000 (14:56 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 8 Jan 2013 13:56:02 +0000 (14:56 +0100)
commitb495ce5446a0bbf2ed63b5880537779e4b123515
tree311c7542e4adb79d02042102fed07c0ccc958ee0
parent9be7e3e2d82396167dd606a77794c412deca4180
widget: Give some meaning to "visible"

GtkWidget::visible is required for the widget to:
- have a preferred size other than 0/0
- have a size allocated
- return other values than { -1, -1, 1, 1 } from get_allocation()

This is an experimental patch aiming to make concepts and behaviors
inside GTK more concreate. GtkWidget::visible is now essentially what
CSS does for "display: none".

Note that if you want the effect of CSS's "visibility: hidden", you'll
have to use a GtkNotebook with an empty page as the concept of reserving
space but not drawing anything isn't supported natively in GTK.
gtk/gtkwidget.c